class Calculator{
    private int num1;
    private int num2;
    public void setNum1(int num1){
        this.num1 = num1;
    }
    public int getNum1(int num1){
        return this.num1;
    }
    public void setNum2(int num2){
        this.num2 = num2;
    }
    public int getNum2(){
        return this.num2;
    }
    public int add(){
        return this.num1 + this.num2;
    }
}



public class TestDemo {
    public static void main(String[] args) {
        Calculator calculator = new Calculator();
        calculator.setNum1(10);
        calculator.setNum2(20);
        System.out.println(calculator.add());
    }
}
